<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD><TITLE>ttk::widget manual page - Tk Themed Widget</TITLE>
<link rel="stylesheet" href="../docs.css" type="text/css" media="all">
</HEAD>
<BODY><H2><a href="../contents.htm">Tcl8.6.11/Tk8.6.11 Documentation</a> <small>&gt;</small> <a href="contents.htm">Tk Commands</a> <small>&gt;</small> ttk_widget</H2>
<H3><A HREF="../UserCmd/contents.htm">Tcl/Tk Applications</A> | <A HREF="../TclCmd/contents.htm">Tcl Commands</A> | <A HREF="../TkCmd/contents.htm">Tk Commands</A> | <A HREF="../ItclCmd/contents.htm">[incr Tcl] Package Commands</A> | <A HREF="../SqliteCmd/contents.htm">SQLite3 Package Commands</A> | <A HREF="../TdbcCmd/contents.htm">TDBC Package Commands</A> | <A HREF="../TdbcmysqlCmd/contents.htm">tdbc::mysql Package Commands</A> | <A HREF="../TdbcodbcCmd/contents.htm">tdbc::odbc Package Commands</A> | <A HREF="../TdbcpostgresCmd/contents.htm">tdbc::postgres Package Commands</A> | <A HREF="../TdbcsqliteCmd/contents.htm">tdbc::sqlite3 Package Commands</A> | <A HREF="../ThreadCmd/contents.htm">Thread Package Commands</A> | <A HREF="../TclLib/contents.htm">Tcl C API</A> | <A HREF="../TkLib/contents.htm">Tk C API</A> | <A HREF="../ItclLib/contents.htm">[incr Tcl] Package C API</A> | <A HREF="../TdbcLib/contents.htm">TDBC Package C API</A></H3>
<DL>
<DD><A HREF="ttk_widget.htm#M2" NAME="L48">NAME</A>
<DL><DD>ttk::widget &mdash; Standard options and commands supported by Tk themed widgets</DD></DL>
<DD><A HREF="ttk_widget.htm#M3" NAME="L49">DESCRIPTION</A>
<DD><A HREF="ttk_widget.htm#M4" NAME="L50">STANDARD OPTIONS</A>
<DL>
<DD><A HREF="ttk_widget.htm#M-class" NAME="L51">-class, undefined, undefined</A>
<DD><A HREF="ttk_widget.htm#M-cursor" NAME="L52">-cursor, cursor, Cursor</A>
<DD><A HREF="ttk_widget.htm#M-takefocus" NAME="L53">-takefocus, takeFocus, TakeFocus</A>
<DD><A HREF="ttk_widget.htm#M-style" NAME="L54">-style, style, Style</A>
</DL>
<DD><A HREF="ttk_widget.htm#M5" NAME="L55">SCROLLABLE WIDGET OPTIONS</A>
<DL>
<DD><A HREF="ttk_widget.htm#M-xscrollcommand" NAME="L56">-xscrollcommand, xScrollCommand, ScrollCommand</A>
<DD><A HREF="ttk_widget.htm#M-yscrollcommand" NAME="L57">-yscrollcommand, yScrollCommand, ScrollCommand</A>
</DL>
<DD><A HREF="ttk_widget.htm#M6" NAME="L58">LABEL OPTIONS</A>
<DL>
<DD><A HREF="ttk_widget.htm#M-compound" NAME="L59">-compound, compound, Compound</A>
<DL class="label options">
<DD><A HREF="ttk_widget.htm#M7" NAME="L60">text</A>
<DD><A HREF="ttk_widget.htm#M8" NAME="L61">image</A>
<DD><A HREF="ttk_widget.htm#M9" NAME="L62">center</A>
<DD><A HREF="ttk_widget.htm#M10" NAME="L63">top</A>
<DD><A HREF="ttk_widget.htm#M11" NAME="L64">bottom</A>
<DD><A HREF="ttk_widget.htm#M12" NAME="L65">left</A>
<DD><A HREF="ttk_widget.htm#M13" NAME="L66">right</A>
<DD><A HREF="ttk_widget.htm#M14" NAME="L67">none</A>
</DL>
<DD><A HREF="ttk_widget.htm#M-font" NAME="L68">-font, font, Font</A>
<DD><A HREF="ttk_widget.htm#M-foreground" NAME="L69">-foreground, textColor, TextColor</A>
<DD><A HREF="ttk_widget.htm#M-image" NAME="L70">-image, image, Image</A>
<DD><A HREF="ttk_widget.htm#M-padding" NAME="L71">-padding, padding, Padding</A>
<DD><A HREF="ttk_widget.htm#M-text" NAME="L72">-text, text, Text</A>
<DD><A HREF="ttk_widget.htm#M-textvariable" NAME="L73">-textvariable, textVariable, Variable</A>
<DD><A HREF="ttk_widget.htm#M-underline" NAME="L74">-underline, underline, Underline</A>
<DD><A HREF="ttk_widget.htm#M-width" NAME="L75">-width, width, Width</A>
</DL>
<DD><A HREF="ttk_widget.htm#M15" NAME="L76">COMPATIBILITY OPTIONS</A>
<DL>
<DD><A HREF="ttk_widget.htm#M-state" NAME="L77">-state, state, State</A>
</DL>
<DD><A HREF="ttk_widget.htm#M16" NAME="L78">COMMANDS</A>
<DL class="commands">
<DD><A HREF="ttk_widget.htm#M17" NAME="L79"><I>pathName </I><B>cget </B><I>option</I></A>
<DD><A HREF="ttk_widget.htm#M18" NAME="L80"><I>pathName </I><B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?</A>
<DD><A HREF="ttk_widget.htm#M19" NAME="L81"><I>pathName </I><B>identify element </B><I>x y</I></A>
<DD><A HREF="ttk_widget.htm#M20" NAME="L82"><I>pathName </I><B>instate </B><I>statespec</I> ?<I>script</I>?</A>
<DD><A HREF="ttk_widget.htm#M21" NAME="L83"><I>pathName </I><B>state</B> ?<I>stateSpec</I>?</A>
<DD><A HREF="ttk_widget.htm#M22" NAME="L84"><I>pathName </I><B>xview </B><I>args</I></A>
<DL class="commands">
<DD><A HREF="ttk_widget.htm#M23" NAME="L85"><I>pathName </I><B>xview</B></A>
<DD><A HREF="ttk_widget.htm#M24" NAME="L86"><I>pathName </I><B>xview</B> <I>index</I></A>
<DD><A HREF="ttk_widget.htm#M25" NAME="L87"><I>pathName </I><B>xview moveto</B><I> fraction</I></A>
<DD><A HREF="ttk_widget.htm#M26" NAME="L88"><I>pathName </I><B>xview scroll </B><I>number what</I></A>
</DL>
<DD><A HREF="ttk_widget.htm#M27" NAME="L89"><I>pathName </I><B>yview </B><I>args</I></A>
<DL class="commands">
<DD><A HREF="ttk_widget.htm#M28" NAME="L90"><I>pathName </I><B>yview</B></A>
<DD><A HREF="ttk_widget.htm#M29" NAME="L91"><I>pathName </I><B>yview</B> <I>index</I></A>
<DD><A HREF="ttk_widget.htm#M30" NAME="L92"><I>pathName </I><B>yview moveto</B><I> fraction</I></A>
<DD><A HREF="ttk_widget.htm#M31" NAME="L93"><I>pathName </I><B>yview scroll </B><I>number what</I></A>
</DL>
</DL>
<DD><A HREF="ttk_widget.htm#M32" NAME="L94">WIDGET STATES</A>
<DL class="widget states">
<DD><A HREF="ttk_widget.htm#M33" NAME="L95"><B>active</B></A>
<DD><A HREF="ttk_widget.htm#M34" NAME="L96"><B>disabled</B></A>
<DD><A HREF="ttk_widget.htm#M35" NAME="L97"><B>focus</B></A>
<DD><A HREF="ttk_widget.htm#M36" NAME="L98"><B>pressed</B></A>
<DD><A HREF="ttk_widget.htm#M37" NAME="L99"><B>selected</B></A>
<DD><A HREF="ttk_widget.htm#M38" NAME="L100"><B>background</B></A>
<DD><A HREF="ttk_widget.htm#M39" NAME="L101"><B>readonly</B></A>
<DD><A HREF="ttk_widget.htm#M40" NAME="L102"><B>alternate</B></A>
<DD><A HREF="ttk_widget.htm#M41" NAME="L103"><B>invalid</B></A>
<DD><A HREF="ttk_widget.htm#M42" NAME="L104"><B>hover</B></A>
</DL>
<DD><A HREF="ttk_widget.htm#M43" NAME="L105">EXAMPLES</A>
<DD><A HREF="ttk_widget.htm#M44" NAME="L106">SEE ALSO</A>
<DD><A HREF="ttk_widget.htm#M45" NAME="L107">KEYWORDS</A>
</DL>
<H3><A NAME="M2">NAME</A></H3>
ttk::widget &mdash; Standard options and commands supported by Tk themed widgets
<H3><A NAME="M3">DESCRIPTION</A></H3>
This manual describes common widget options and commands.
<H3><A NAME="M4">STANDARD OPTIONS</A></H3>
The following options are supported by all Tk themed widgets:
<DL>
<DT>Command-Line Name: <B><A NAME="M-class">-class</A></B>
<DT>Database Name: <B>undefined</B>
<DT>Database Class: <B>undefined</B>
<DD>Specifies the window class.
The class is used when querying the option database
for the window's other options, to determine the default
bindtags for the window, and to select the widget's default
layout and style.
This is a read-only option:
it may only be specified when the window is created,
and may not be changed with the <B>configure</B> widget command.
<P><DT>Command-Line Name: <B><A NAME="M-cursor">-cursor</A></B>
<DT>Database Name: <B>cursor</B>
<DT>Database Class: <B>Cursor</B>
<DD>Specifies the mouse cursor to be used for the widget.
See <B><A HREF="../TkLib/GetCursor.htm">Tk_GetCursor</A></B> and <I>cursors(n)</I> in the Tk reference manual
for the legal values.
If set to the empty string (the default),
the cursor is inherited from the parent widget.
<P><DT>Command-Line Name: <B><A NAME="M-takefocus">-takefocus</A></B>
<DT>Database Name: <B>takeFocus</B>
<DT>Database Class: <B>TakeFocus</B>
<DD>Determines whether the window accepts the focus during keyboard traversal.
Either <B>0</B>, <B>1</B>, a command prefix (to which the widget path
is appended, and which should return <B>0</B> or <B>1</B>),
or the empty string.
See <I>options(n)</I> in the Tk reference manual for the full description.
<P><DT>Command-Line Name: <B><A NAME="M-style">-style</A></B>
<DT>Database Name: <B><A HREF="../TkCmd/ttk_style.htm">style</A></B>
<DT>Database Class: <B><A HREF="../TkCmd/ttk_style.htm">Style</A></B>
<DD>May be used to specify a custom widget style.
</DL>
<H3><A NAME="M5">SCROLLABLE WIDGET OPTIONS</A></H3>
The following options are supported by widgets that
are controllable by a scrollbar.
See <I>scrollbar(n)</I> for more information
<DL>
<DT>Command-Line Name: <B><A NAME="M-xscrollcommand">-xscrollcommand</A></B>
<DT>Database Name: <B>xScrollCommand</B>
<DT>Database Class: <B>ScrollCommand</B>
<DD>A command prefix, used to communicate with horizontal scrollbars.
When the view in the widget's window changes, the widget will
generate a Tcl command by concatenating the scroll command and
two numbers.
Each of the numbers is a fraction between 0 and 1 indicating
a position in the document; 0 indicates the beginning,
and 1 indicates the end.
The first fraction indicates the first information in the widget
that is visible in the window, and the second fraction indicates
the information just after the last portion that is visible.
<P>
Typically the <B>-xscrollcommand</B> option consists of the path name
of a <B><A HREF="../TkCmd/scrollbar.htm">scrollbar</A></B> widget followed by
&ldquo;set&rdquo;,
e.g.
&ldquo;.x.scrollbar set&rdquo;.
This will cause the scrollbar to be updated whenever the view in the
window changes.
<P>
If this option is set to the empty string (the default),
then no command will be executed.
<P><DT>Command-Line Name: <B><A NAME="M-yscrollcommand">-yscrollcommand</A></B>
<DT>Database Name: <B>yScrollCommand</B>
<DT>Database Class: <B>ScrollCommand</B>
<DD>A command prefix, used to communicate with vertical scrollbars.
See the description of <B>-xscrollcommand</B> above for details.
</DL>
<H3><A NAME="M6">LABEL OPTIONS</A></H3>
The following options are supported by labels, buttons,
and other button-like widgets:
<DL>
<DT>Command-Line Name: <B><A NAME="M-compound">-compound</A></B>
<DT>Database Name: <B>compound</B>
<DT>Database Class: <B>Compound</B>
<DD>Specifies how to display the image relative to the text,
in the case both <B>-text</B> and <B>-image</B> are present.
If set to the empty string (the default), the rules described in the
&quot;Elements&quot; section of <I>ttk::intro(n)</I> explain which value is actually
used.
Valid values are:
<P>
<DL class="label options">
<DT><A NAME="M7">text</A><DD>
Display text only.
<P><DT><A NAME="M8">image</A><DD>
Display image only.
<P><DT><A NAME="M9">center</A><DD>
Display text centered on top of image.
<P><DT><A NAME="M10">top</A><DD>
<P><DT><A NAME="M11">bottom</A><DD>
<P><DT><A NAME="M12">left</A><DD>
<P><DT><A NAME="M13">right</A><DD>
Display image above, below, left of, or right of the text, respectively.
<P><DT><A NAME="M14">none</A><DD>
Display the image if present, otherwise the text.
<P></DL>
<P><DT>Command-Line Name: <B><A NAME="M-font">-font</A></B>
<DT>Database Name: <B><A HREF="../TkCmd/font.htm">font</A></B>
<DT>Database Class: <B><A HREF="../TkCmd/font.htm">Font</A></B>
<DD>Font to use for the text displayed by the widget.
<P><DT>Command-Line Name: <B><A NAME="M-foreground">-foreground</A></B>
<DT>Database Name: <B>textColor</B>
<DT>Database Class: <B>TextColor</B>
<DD>The widget's foreground color.
If unspecified, the theme default is used.
<P><DT>Command-Line Name: <B><A NAME="M-image">-image</A></B>
<DT>Database Name: <B>image</B>
<DT>Database Class: <B>Image</B>
<DD>Specifies an image to display.
This is a list of 1 or more elements.
The first element is the default image name.
The rest of the list is a sequence of <I>statespec / value</I> pairs
as per <B><A HREF="../TkCmd/ttk_style.htm">style map</A></B>, specifying different images to use when
the widget is in a particular state or combination of states.
All images in the list should have the same size.
<P><DT>Command-Line Name: <B><A NAME="M-padding">-padding</A></B>
<DT>Database Name: <B>padding</B>
<DT>Database Class: <B>Padding</B>
<DD>Specifies the internal padding for the widget.
The padding is a list of up to four length specifications
<I>left top right bottom</I>.
If fewer than four elements are specified,
<I>bottom</I> defaults to <I>top</I>,
<I>right</I> defaults to <I>left</I>, and
<I>top</I> defaults to <I>left</I>.
In other words, a list of three numbers specify the left, vertical, and right padding;
a list of two numbers specify the horizontal and the vertical padding;
a single number specifies the same padding all the way around the widget.
<P><DT>Command-Line Name: <B><A NAME="M-text">-text</A></B>
<DT>Database Name: <B>text</B>
<DT>Database Class: <B>Text</B>
<DD>Specifies a text string to be displayed inside the widget
(unless overridden by <B>-textvariable</B>).
<P><DT>Command-Line Name: <B><A NAME="M-textvariable">-textvariable</A></B>
<DT>Database Name: <B>textVariable</B>
<DT>Database Class: <B>Variable</B>
<DD>Specifies the name of a global variable whose value will be used
in place of the <B>-text</B> resource.
<P><DT>Command-Line Name: <B><A NAME="M-underline">-underline</A></B>
<DT>Database Name: <B>underline</B>
<DT>Database Class: <B>Underline</B>
<DD>If set, specifies the integer index (0-based) of a character to underline
in the text string.
The underlined character is used for mnemonic activation.
<P><DT>Command-Line Name: <B><A NAME="M-width">-width</A></B>
<DT>Database Name: <B>width</B>
<DT>Database Class: <B>Width</B>
<DD>If greater than zero, specifies how much space, in character widths,
to allocate for the text label.
If less than zero, specifies a minimum width.
If zero or unspecified, the natural width of the text label is used.
</DL>
<H3><A NAME="M15">COMPATIBILITY OPTIONS</A></H3>
This option is only available for themed widgets that have
&ldquo;corresponding&rdquo;
traditional Tk widgets.
<DL>
<DT>Command-Line Name: <B><A NAME="M-state">-state</A></B>
<DT>Database Name: <B>state</B>
<DT>Database Class: <B>State</B>
<DD>May be set to <B>normal</B> or <B>disabled</B>
to control the <B>disabled</B> state bit.
This is a write-only option:
setting it changes the widget state,
but the <B>state</B> widget command
does not affect the <B>-state</B> option.
</DL>
<H3><A NAME="M16">COMMANDS</A></H3>
<DL class="commands">
<DT><A NAME="M17"><I>pathName </I><B>cget </B><I>option</I></A><DD>
Returns the current value of the configuration option given
by <I>option</I>.
<P><DT><A NAME="M18"><I>pathName </I><B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>?</A><DD>
Query or modify the configuration options of the widget.
If one or more <I>option-value</I> pairs are specified,
then the command modifies the given widget option(s)
to have the given value(s);
in this case the command returns an empty string.
If <I>option</I> is specified with no <I>value</I>,
then the command returns a list describing the named option:
the elements of the list are the
option name, database name, database class, default value,
and current value.
If no <I>option</I> is specified, returns a list describing all of
the available options for <I>pathName</I>.
<P><DT><A NAME="M19"><I>pathName </I><B>identify element </B><I>x y</I></A><DD>
Returns the name of the element under the point given
by <I>x</I> and <I>y</I>, or an empty string if the point does
not lie within any element.
<I>x</I> and <I>y</I> are pixel coordinates relative to the widget.
Some widgets accept other <B>identify</B> subcommands.
<P><DT><A NAME="M20"><I>pathName </I><B>instate </B><I>statespec</I> ?<I>script</I>?</A><DD>
Test the widget's state.
If <I>script</I> is not specified, returns 1 if
the widget state matches <I>statespec</I> and 0 otherwise.
If <I>script</I> is specified, equivalent to
<PRE>if {[<I>pathName</I> instate <I>stateSpec</I>]} <I>script</I></PRE>
<P><DT><A NAME="M21"><I>pathName </I><B>state</B> ?<I>stateSpec</I>?</A><DD>
Modify or inquire widget state.
If <I>stateSpec</I> is present, sets the widget state:
for each flag in <I>stateSpec</I>, sets the corresponding flag
or clears it if prefixed by an exclamation point.
<DL><DD>
Returns a new state spec indicating which flags were changed:
<PRE>set changes [<I>pathName </I>state <I>spec</I>]
<I>pathName </I>state $changes</PRE>
will restore <I>pathName</I> to the original state.
If <I>stateSpec</I> is not specified,
returns a list of the currently-enabled state flags.
</DL>
<P><DT><A NAME="M22"><I>pathName </I><B>xview </B><I>args</I></A><DD>
This command is used to query and change the horizontal position of the
content in the widget's window.  It can take any of the following
forms:
<P>
<DL class="commands">
<DT><A NAME="M23"><I>pathName </I><B>xview</B></A><DD>
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the horizontal span that is visible in the window.
For example, if the first element is .2 and the second element is .6,
20% of the widget's content is off-screen to the left, the middle 40% is visible
in the window, and 40% of the content is off-screen to the right.
These are the same values passed to scrollbars via the <B>-xscrollcommand</B>
option.
<P><DT><A NAME="M24"><I>pathName </I><B>xview</B> <I>index</I></A><DD>
Adjusts the view in the window so that the content given by <I>index</I>
is displayed at the left edge of the window.
<P><DT><A NAME="M25"><I>pathName </I><B>xview moveto</B><I> fraction</I></A><DD>
Adjusts the view in the window so that the character <I>fraction</I> of the
way through the content appears at the left edge of the window.
<I>Fraction</I> must be a fraction between 0 and 1.
<P><DT><A NAME="M26"><I>pathName </I><B>xview scroll </B><I>number what</I></A><DD>
This command shifts the view in the window left or right according to
<I>number</I> and <I>what</I>.
<I>Number</I> must be an integer.
<I>What</I> must be either <B>units</B> or <B>pages</B>.
If <I>what</I> is <B>units</B>, the view adjusts left or right by
<I>number</I> average-width characters on the display;  if it is
<B>pages</B> then the view adjusts by <I>number</I> screenfuls.
If <I>number</I> is negative then characters farther to the left
become visible;  if it is positive then characters farther to the right
become visible.
<P></DL>
<P><DT><A NAME="M27"><I>pathName </I><B>yview </B><I>args</I></A><DD>
This command is used to query and change the vertical position of the
content in the widget's window.  It can take any of the following
forms:
<P>
<DL class="commands">
<DT><A NAME="M28"><I>pathName </I><B>yview</B></A><DD>
Returns a list containing two elements.
Each element is a real fraction between 0 and 1; together they describe
the vertical span that is visible in the window.
For example, if the first element is .2 and the second element is .6,
20% of the widget's content is off-screen to the top, the middle 40% is visible
in the window, and 40% of the content is off-screen to the bottom.
These are the same values passed to scrollbars via the <B>-yscrollcommand</B>
option.
<P><DT><A NAME="M29"><I>pathName </I><B>yview</B> <I>index</I></A><DD>
Adjusts the view in the window so that the content given by <I>index</I>
is displayed at the top edge of the window.
<P><DT><A NAME="M30"><I>pathName </I><B>yview moveto</B><I> fraction</I></A><DD>
Adjusts the view in the window so that the item <I>fraction</I> of the
way through the content appears at the top edge of the window.
<I>Fraction</I> must be a fraction between 0 and 1.
<P><DT><A NAME="M31"><I>pathName </I><B>yview scroll </B><I>number what</I></A><DD>
This command shifts the view in the window up or down according to
<I>number</I> and <I>what</I>.
<I>Number</I> must be an integer.
<I>What</I> must be either <B>units</B> or <B>pages</B>.
If <I>what</I> is <B>units</B>, the view adjusts up or down by
<I>number</I> average-width characters on the display;  if it is
<B>pages</B> then the view adjusts by <I>number</I> screenfuls.
If <I>number</I> is negative then items farther to the top
become visible;  if it is positive then items farther to the bottom
become visible.
<P></DL>
<P></DL>
<H3><A NAME="M32">WIDGET STATES</A></H3>
The widget state is a bitmap of independent state flags.
Widget state flags include:
<P>
<DL class="widget states">
<DT><A NAME="M33"><B>active</B></A><DD>
The mouse cursor is over the widget
and pressing a mouse button will cause some action to occur. (aka
&ldquo;prelight&rdquo;
(Gnome),
&ldquo;hot&rdquo;
(Windows),
&ldquo;hover&rdquo;).
<P><DT><A NAME="M34"><B>disabled</B></A><DD>
Widget is disabled under program control (aka
&ldquo;unavailable&rdquo;,
&ldquo;inactive&rdquo;).
<P><DT><A NAME="M35"><B>focus</B></A><DD>
Widget has keyboard focus.
<P><DT><A NAME="M36"><B>pressed</B></A><DD>
Widget is being pressed (aka
&ldquo;armed&rdquo;
in Motif).
<P><DT><A NAME="M37"><B>selected</B></A><DD>
&ldquo;On&rdquo;,
&ldquo;true&rdquo;,
or
&ldquo;current&rdquo;
for things like checkbuttons and radiobuttons.
<P><DT><A NAME="M38"><B>background</B></A><DD>
Windows and the Mac have a notion of an
&ldquo;active&rdquo;
or foreground window.
The <B>background</B> state is set for widgets in a background window,
and cleared for those in the foreground window.
<P><DT><A NAME="M39"><B>readonly</B></A><DD>
Widget should not allow user modification.
<P><DT><A NAME="M40"><B>alternate</B></A><DD>
A widget-specific alternate display format.
For example, used for checkbuttons and radiobuttons in the
&ldquo;tristate&rdquo;
or
&ldquo;mixed&rdquo;
state, and for buttons with <B>-default active</B>.
<P><DT><A NAME="M41"><B>invalid</B></A><DD>
The widget's value is invalid.
(Potential uses: scale widget value out of bounds,
entry widget value failed validation.)
<P><DT><A NAME="M42"><B>hover</B></A><DD>
The mouse cursor is within the widget.
This is similar to the <B>active</B> state;
it is used in some themes for widgets that
provide distinct visual feedback for
the active widget in addition to the active element
within the widget.
<P></DL>
<P>
A <I>state specification</I> or <I>stateSpec</I> is a list
of state names, optionally prefixed with an exclamation point (!)
indicating that the bit is off.
<H3><A NAME="M43">EXAMPLES</A></H3>
<PRE>set b [ttk::button .b]

# Disable the widget:
$b <B>state</B> disabled

# Invoke the widget only if it is currently pressed and enabled:
$b <B>instate</B> {pressed !disabled} { .b invoke }

# Reenable widget:
$b <B>state</B> !disabled</PRE>
<H3><A NAME="M44">SEE ALSO</A></H3>
<B><A HREF="../TkCmd/ttk_intro.htm">ttk::intro</A></B>, <B><A HREF="../TkCmd/ttk_style.htm">ttk::style</A></B>
<H3><A NAME="M45">KEYWORDS</A></H3>
<A href="../Keywords/S.htm#state">state</A>, <A href="../Keywords/C.htm#configure">configure</A>, <A href="../Keywords/O.htm#option">option</A>
<div class="copy">Copyright &copy; 2004 Joe English
</div>
</BODY></HTML>
